Partial Evaluation of Call - by - value - calculus with Side - e ects
نویسندگان
چکیده
We present a framework of an online partial evaluator for a call-by-value -calculus with destructive updates of data structures. To our knowledge, this is the rst partial evaluator that can deal with full side-e ects as well as pointer equality in higher-order languages. Our partial evaluator uses a side-e ect analysis for handling assignment operations and then performs an online specialization using preactions. By separating mutable data structures from immutable ones using the side-e ect analysis, the most accesses to structured data (e.g., cons cells) are statically reduced at partial evaluation time. For the correct residualization of side-e ecting operations, preactions are used to solve various issues, such as code elimination, code duplication, and the order of execution. The resulting partial evaluator is simple enough to prove its correctness. Based on the framework, we extend it to a partial evaluator for almost full Scheme and demonstrate that it is powerful enough to specialize an interpreter written using side-e ects. ANY OTHER IDENTIFYING INFORMATION OF THIS REPORT DISTRIBUTION STATEMENT First issue 35 copies. SUPPLEMENTARY NOTES REPORT DATE
منابع مشابه
Pragmatics of Type-Directed Partial Evaluation
Type directed partial evaluation stems from the residualiz ation of arbitrary static values in dynamic contexts given their type Its algorithm coincides with the one for coercing a subtype value into a supertype value which itself coincides with the one of normalization in the calculus Type directed partial evaluation is thus used to specialize compiled closed programs given their type Since Si...
متن کاملPartial Evaluation of Call-by-value -calculus with Side-effects
We present a framework of an online partial evaluator for a callby-value -calculus with destructive updates of data structures. It properly and correctly specializes expressions that contain sideeffects, while preserving pointer equality, which is an important property for programs using updates. Our partial evaluator uses a side-effect analysis to extract immutable data structures and then per...
متن کاملOn the Expressive Power of User - Defined E ects
We compare the expressive power of three programming abstractions for user-de ned computational e ects: Bauer and Pretnar’s e ect handlers, Filinski’s monadic re ection, and delimited control without answer-type-modi cation. This comparison allows a precise discussion about the relative expressiveness of each programming abstraction. It also demonstrates the sensitivity of the relative expressi...
متن کاملNormalization and Partial Evaluation
We give an introduction to normalization by evaluation and type-directed partial evaluation. We first present normalization by evaluation for a combinatory version of Gödel System T. Then we show normalization by evaluation for typed lambda calculus with β and η conversion. Finally, we introduce the notion of binding time, and explain the method of type-directed partial evaluation for a small P...
متن کاملCall-by-Value, Call-by-Name and the Logic of Values
We introduce two logics for partiality, a call-by-value logic and a call-by-name logic. Both logics are variants of the logic of partial terms, an extension of the first-order predicate calculus by a definedness predicate. In our logics, however, quantifiers may only be instantiated to value terms and not to arbitrary, defined terms as in the logic of partial terms. We show that the call-by-val...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1996